Video signal processing method and device using block dpcm prediction method

ABSTRACT

The present disclosure relates to a method and device for processing a video signal and, more specifically, comprises the steps of: parsing, from a bitstream, block-based delta pulse code modulation (BDPCM) enable information indicating whether or not BDPCM has been enabled; when the BDPCM enable information indicates that the BDPCM has been enabled, the width of a current block is less than or equal to a first value, and the height of the current block is less than or equal to a second value, parsing, from the bitstream, intra BDPCM information indicating whether or not the BDPCM is to be applied to the current block; when the intra BDPCM information indicates that the BDPCM is to be applied to the current block, parsing, from the bitstream, intra BDPCM direction information regarding the current block; and reconstructing the current block on the basis of the intra BDPCM direction information.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is the U.S. National Stage filing under 35 U.S.C. 371of pending PCT International Application No. PCT/KR2020/007530, whichwas filed on Jun. 10, 2020, and which claims priority under 35 U.S.C119(a) to Korean Patent Application No. 10-2019-0068630 filed with theKorean Intellectual Property Office on Jun. 11, 2019. The disclosures ofthe above patent applications are incorporated herein by reference intheir entirety.

TECHNICAL FIELD

The present disclosure relates to a method and device for processing avideo signal, and more particularly, to a method and device forprocessing a video signal for encoding or decoding the video signal.

BACKGROUND ART

Compression coding refers to a series of signal processing techniquesfor transmitting digitized information through a communication line orstoring information in a form suitable for a storage medium. An objectof compression encoding includes objects such as voice, video, and text,and in particular, a technique for performing compression encoding on animage is referred to as video compression. Compression coding for avideo signal is performed by removing excess information inconsideration of spatial correlation, temporal correlation, andstochastic correlation. However, with the recent development of variousmedia and data transmission media, a more efficient video signalprocessing method and apparatus are required.

DISCLOSURE OF THE INVENTION Technical Problem

An object of the present disclosure is to increase coding efficiency ofthe video signal.

Technical Solution

A method for processing a video signal according to an embodiment of thepresent disclosure includes the steps of parsing block-based delta pulsecode modulation (BDPCM) enable information indicating whether BDPCM isenabled from a bitstream, when the BDPCM enable information indicatesthat the BDPCM is enabled, a width of a current block is less than orequal to a first value and a height of the current block is less than orequal to a second value, parsing intra BDPCM information indicatingwhether the BDPCM is applied to the current block from the bitstream,when the intra BDPCM information indicates that the BDPCM is applied tothe current block, parsing intra BDPCM direction information related tothe current block, and reconstructing the current block based on theintra BDPCM direction information.

In the method for processing the video signal according to theembodiment of the present disclosure, the first value and the secondvalue are each a maximum block size that allows transform skip.

In the method for processing the video signal according to theembodiment of the present disclosure, the intra BDPCM information andthe intra BDPCM direction information are parsed for a luma componentregardless of a chroma component.

In the method for processing the video signal according to theembodiment of the present disclosure, the BDPCM enable information issignaled as a sequence.

In the method for processing the video signal according to theembodiment of the present disclosure, when the intra BDPCM informationindicates that the BDPCM is applied to the current block, transform skipinformation of a transform block corresponding to the current block isnot parsed from the bitstream, and the transform skip informationindicates that transform is not applied to a block corresponding to thetransform skip information when a value of the transform skipinformation is a first inference value.

The method for processing the video signal according to the embodimentof the present disclosure further includes the steps of, when thetransform skip information does not exist and the intra BDPCMinformation indicates that the BDPCM is applied to the current block,inferring the transform skip information as the first inference value,and, when the transform skip information does not exist and the intraBDPCM information indicates that the BDPCM is not applied to the currentblock, inferring the transform skip information as a second inferencevalue.

In the method for processing the video signal according to theembodiment of the present disclosure, the intra BDPCM directioninformation indicates one of a horizontal direction or a verticaldirection.

The method for processing the video signal according to the embodimentof the present disclosure further includes the steps of, when the intraBDPCM direction information is 0, selecting an intra prediction modecorresponding to the horizontal direction among a plurality of intramodes as an intra prediction mode of the current block, and, when theintra BDPCM direction information is 1, selecting an intra predictionmode corresponding to the vertical direction among the plurality ofintra modes as the intra prediction mode of the current block.

In the method for processing the video signal according to theembodiment of the present disclosure, the intra prediction mode of thecurrent block is used to determine an intra prediction mode of aneighboring block to be reconstructed after the current block.

A device for processing a video signal according to an embodiment of thepresent disclosure includes a processor and a memory, in which theprocessor, based on instructions stored in the memory, parsesblock-based delta pulse code modulation (BDPCM) enable informationindicating whether BDPCM is enabled from a bitstream, when the BDPCMenable information indicates that the BDPCM is enabled, a width of acurrent block is less than or equal to a first value, and a height ofthe current block is less than or equal to a second value, parses intraBDPCM information indicating whether the BDPCM is applied to the currentblock from the bitstream, when the intra BDPCM information indicatesthat the BDPCM is applied to the current block, parses intra BDPCMdirection information related to the current block from the bitstream,and reconstructs the current block based on the intra BDPCM directioninformation.

In the device for processing the video signal according to theembodiment of the present disclosure, the first value and the secondvalue are each a maximum block size that allows transform skip.

In the device for processing the video signal according to theembodiment of the present disclosure, the intra BDPCM information andthe intra BDPCM direction information are parsed for a luma componentregardless of a chroma component.

In the device for processing the video signal according to theembodiment of the present disclosure, the BDPCM enable information maybe signaled as a sequence.

In the device for processing the video signal according to theembodiment of the present disclosure, when the intra BDPCM informationindicates that the BDPCM is applied to the current block, transform skipinformation of a transform block corresponding to the current block isnot parsed from the bitstream, and the transform skip informationindicates that transform is not applied to a block corresponding to thetransform skip information when a value of the transform skipinformation is a first inference value.

In the device for processing the video signal according to theembodiment of the present disclosure, the processor, based oninstructions stored in the memory, when the transform skip informationdoes not exist and the intra BDPCM information indicates that the BDPCMis applied to the current block, infers the transform skip informationas the first inference value, and the processor, based on instructionsstored in the memory, when the transform skip information does not existand the intra BDPCM information indicates that the BDPCM is not appliedto the current block, infers the transform skip information as a secondinference value.

In the device for processing the video signal according to theembodiment of the present disclosure, the intra BDPCM directioninformation indicates one of a horizontal direction or a verticaldirection.

In the device for processing the video signal according to theembodiment of the present disclosure, the processor, based oninstructions stored in the memory, when the intra BDPCM directioninformation is 0, selects an intra prediction mode corresponding to thehorizontal direction among a plurality of intra modes as an intraprediction mode of the current block, and the processor, based oninstructions stored in the memory, when the intra BDPCM directioninformation is 1, selects an intra prediction mode corresponding to thevertical direction among the plurality of intra modes as the intraprediction mode of the current block.

In the device for processing the video signal according to theembodiment of the present disclosure, the intra prediction mode of thecurrent block is used to determine an intra prediction mode of aneighboring block to be reconstructed after the current block.

A method for processing a video signal according to an embodiment of thepresent disclosure includes the steps of generating block-based deltapulse code modulation (BDPCM) enable information indicating whetherBDPCM is enabled, when the BDPCM enable information indicates that theBDPCM is enabled, a width of a current block is less than or equal to afirst value, and a height of the current block is less than or equal toa second value, generating intra BDPCM information indicating whetherthe BDPCM is applied to the current block, when the intra BDPCMinformation indicates that the BDPCM is applied to the current block,generating intra BDPCM direction information related to the currentblock, and generating a bitstream based on the BDPCM enable information,the intra BDPCM information, and the intra BDPCM direction information.

In the method for processing the video signal according to theembodiment of the present disclosure, when the intra BDPCM informationindicates that BDPCM is applied to the current block, transform skipinformation of a transform block corresponding to the current block isnot generated.

A device for processing a video signal according to an embodiment of thepresent disclosure includes a processor and a memory, in which theprocessor, based on instructions stored in the memory, generatesblock-based delta pulse code modulation (BDPCM) enable informationindicating whether BDPCM is enabled, when the BDPCM enable informationindicates that the BDPCM is enabled, a width of a current block is lessthan or equal to a first value, and a height of the current block isless than or equal to a second value, generates intra BDPCM informationindicating whether the BDPCM is applied to the current block, when theintra BDPCM information indicates that the BDPCM is to be applied to thecurrent block, generates intra BDPCM direction information related tothe current block, and generates a bitstream based on the BDPCM enableinformation, the intra BDPCM information, and the intra BDPCM directioninformation.

In the device for processing the video signal according to theembodiment of the present disclosure, when the intra BDPCM informationindicates that the BDPCM is applied to the current block, transform skipinformation of a transform block corresponding to the current block isnot generated.

A computer-readable recording medium having an encoded video signalrecorded therein according to an embodiment of the present disclosureincludes the steps of generating block-based delta pulse code modulation(BDPCM) enable information indicating whether BDPCM is enabled, when theBDPCM enable information indicates that the BDPCM is enabled, a width ofa current block is less than or equal to a first value, and a height ofthe current block is less than or equal to a second value, generatingintra BDPCM information indicating whether or not the BDPCM is appliedto the current block, when the intra BDPCM information indicates thatthe BDPCM is applied to the current block, generating intra BDPCMdirection information related to the current block, and generating abitstream based on the BDPCM enable information, the intra BDPCMinformation, and the intra BDPCM direction information.

Advantageous Effects

According to an embodiment of the present disclosure, coding efficiencyof a video signal can be increased.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic block diagram of a video signal encoding apparatusaccording to an embodiment of the present invention.

FIG. 2 is a schematic block diagram of a video signal decoding apparatusaccording to an embodiment of the present invention.

FIG. 3 shows an embodiment in which a coding tree unit is divided intocoding units in a picture.

FIG. 4 shows an embodiment of a method for signaling a division of aquad tree and a multi-type tree.

FIG. 5 illustrates an embodiment of reference samples used forprediction of a current block in an intra prediction mode.

FIG. 6 illustrates an embodiment of prediction modes used for intraprediction.

FIG. 7 is a flowchart illustrating an operation of a device forprocessing a video signal according to an embodiment of the presentdisclosure.

FIG. 8 is a diagram illustrating a prediction mode and a quantizedresidual signal of block DPCM (BDPCM).

FIG. 9 is a diagram illustrating a BDPCM flag defined in a sequenceparameter set.

FIG. 10 is a diagram illustrating a part of a coding unit syntaxstructure.

FIG. 11 is a diagram illustrating a part of coding unit syntax andincludes a size variable of a block to which BDPCM is applied.

FIG. 12 is a diagram illustrating a part of a transform unit syntax.

FIG. 13 is a diagram illustrating signaling/parsing conditions of atransform skip flag within a part of the transform unit syntax.

FIG. 14 is a diagram illustrating a relationship between a block towhich BDPCM is applied and an intra prediction mode variable.

MODE FOR CARRYING OUT THE INVENTION

Terms used in this specification may be currently widely used generalterms in consideration of functions in the present invention but mayvary according to the intents of those skilled in the art, customs, orthe advent of new technology. Additionally, in certain cases, there maybe terms the applicant selects arbitrarily and in this case, theirmeanings are described in a corresponding description part of thepresent invention. Accordingly, terms used in this specification shouldbe interpreted based on the substantial meanings of the terms andcontents over the whole specification.

In this specification, some terms may be interpreted as follows. Codingmay be interpreted as encoding or decoding in some cases. In the presentspecification, an apparatus for generating a video signal bitstream byperforming encoding (coding) of a video signal is referred to as anencoding apparatus or an encoder, and an apparatus that performsdecoding (decoding) of a video signal bitstream to reconstruct a videosignal is referred to as a decoding apparatus or decoder. In addition,in this specification, the video signal processing apparatus is used asa term of a concept including both an encoder and a decoder. Informationis a term including all values, parameters, coefficients, elements, etc.In some cases, the meaning is interpreted differently, so the presentinvention is not limited thereto. A ‘unit’ is used to mean a basic unitof image processing or a specific position of a picture, and refers toan image region including both a luma component and a chroma component.In addition, a ‘block’ refers to an image region including a specificcomponent among the luma component and the chroma component (i.e., Cband Cr). However, terms such as ‘unit’, ‘block’, ‘partition’, and‘region’ may be used interchangeably depending on the embodiment. Inaddition, in the present specification, the unit or block can be used asa concept including both a coding unit (or a coding block), a predictionunit (or a prediction block), and a transform unit (or a transformblock). The picture indicates a field or a frame, and the terms may beused interchangeably depending on the embodiment.

FIG. 1 is a schematic block diagram of a video signal encoding apparatusaccording to an embodiment of the present invention. Referring to FIG.1, the encoding apparatus 100 of the present invention includes atransformation unit 110, a quantization unit 115, an inversequantization unit 120, an inverse transformation unit 125, a filteringunit 130, a prediction unit 150, and an entropy coding unit 160.

The transformation unit 110 obtains a value of a transform coefficientby transforming a residual signal, which is a difference between theinputted video signal and the predicted signal generated by theprediction unit 150. For example, a Discrete Cosine Transform (DCT), aDiscrete Sine Transform (DST), or a Wavelet Transform can be used. TheDCT and DST perform transformation by splitting the input picture signalinto blocks. In the transformation, coding efficiency may vary accordingto the distribution and characteristics of values in the transformationregion. The quantization unit 115 quantizes the value of the transformcoefficient value outputted from the transformation unit 110.

In order to improve coding efficiency, instead of coding the picturesignal as it is, a method of predicting a picture using a region alreadycoded through the prediction unit 150 and obtaining a reconstructedpicture by adding a residual value between the original picture and thepredicted picture to the predicted picture is used. In order to preventmismatches in the encoder and decoder, information that can be used inthe decoder should be used when performing prediction in the encoder.For this, the encoder performs a process of reconstructing the encodedcurrent block again. The inverse quantization unit 120 inverse-quantizesthe value of the transform coefficient, and the inverse transformationunit 125 reconstructs the residual value using the inverse quantizedtransform coefficient value. Meanwhile, the filtering unit 130 performsfiltering operations to improve the quality of the reconstructed pictureand to improve the coding efficiency. For example, a deblocking filter,a sample adaptive offset (SAO), and an adaptive loop filter may beincluded. The filtered picture is outputted or stored in a decodedpicture buffer (DPB) 156 for use as a reference picture.

The prediction unit 150 includes an intra prediction unit 152 and aninter prediction unit 154. The intra prediction unit 152 performs intraprediction in the current picture, and the inter prediction unit 154performs inter prediction to predict the current picture by using thereference picture stored in the DBP 156. The intra prediction unit 152performs intra prediction from reconstructed samples in the currentpicture, and transfers intra encoding information to the entropy codingunit 160. The intra encoding information may include at least one of anintra prediction mode, a most probable mode (MPM) flag, and an MPMindex. The inter prediction unit 154 may include the motion estimationunit 154 a and the motion compensation unit 154 b. The motion estimationunit 154 a obtains a motion vector value of the current region byreferring to a specific region of the reconstructed reference picture.The motion estimation unit 154 a transfers a motion information set(reference picture index, motion vector information, etc.) for thereference region to the entropy coding unit 160. The motion compensationunit 154 b performs motion compensation by using the motion vector valuetransferred from the motion estimation unit 154 a. The inter predictionunit 154 transfers inter encoding information including motioninformation on the reference region to the entropy coding unit 160.

When the picture prediction described above is performed, thetransformation unit 110 transforms a residual value between the originalpicture and the predicted picture to obtain a transform coefficientvalue. In this case, the transformation may be performed in a specificblock unit within a picture, and the size of a specific block may bevaried within a preset range. The quantization unit 115 quantizes thetransform coefficient value generated in the transformation unit 110 andtransmits it to the entropy coding unit 160.

The entropy coding unit 160 performs entropy coding on the quantizedtransform coefficient, inter coding information, intra codinginformation, and the like to generate the video signal bitstream. In theentropy coding unit 160, a variable length coding (VLC) scheme, anarithmetic coding scheme, etc. may be used. The variable length coding(VLC) scheme includes transforming input symbols into consecutivecodewords, and a length of a codeword may be variable. For example,frequently occurring symbols are represented by a short codeword, andinfrequently occurring symbols are represented by a long codeword. Acontext-based adaptive variable length coding (CAVLC) scheme may be usedas a variable length coding scheme. Arithmetic coding may transformcontinuous data symbols into a single prime number, wherein arithmeticcoding may obtain an optimal bit required for representing each symbol.A context-based adaptive binary arithmetic code (CABAC) may be used asarithmetic coding.

The generated bitstream is encapsulated using a network abstractionlayer (NAL) unit as a basic unit. The NAL unit includes an integernumber of coded coding tree units. In order to decode a bitstream in avideo decoder, first, the bitstream must be separated in NAL units, andthen each separated NAL unit must be decoded. Meanwhile, informationnecessary for decoding a video signal bitstream may be transmittedthrough an upper level set of Raw Byte Sequence Payload (RBSP) such asPicture Parameter Set (PPS), Sequence Parameter Set (SPS), VideoParameter Set (VPS), and the like.

Meanwhile, the block diagram of FIG. 1 shows an encoding apparatus 100according to an embodiment of the present invention, and separatelydisplayed blocks logically distinguish and show the elements of theencoding apparatus 100. Accordingly, the elements of the above-describedencoding apparatus 100 may be mounted as one chip or as a plurality ofchips depending on the design of the device. According to an embodiment,the operation of each element of the above-described encoding apparatus100 may be performed by a processor (not shown).

FIG. 2 is a schematic block diagram of a video signal decoding apparatus200 according to an embodiment of the present invention. Referring toFIG. 2, the decoding apparatus 200 of the present invention includes anentropy decoding unit 210, an inverse quantization unit 220, an inversetransformation unit 225, a filtering unit 230, and a prediction unit250.

The entropy decoding unit 210 entropy-decodes a video signal bitstreamto extract transform coefficient, intra encoding information, interencoding information, and the like for each region. The inversequantization unit 220 inverse-quantizes the entropy-decoded transformcoefficient, and the inverse transformation unit 225 restores a residualvalue by using the inverse-quantized transform coefficient. The videosignal processing device 200 restores an original pixel value by summingthe residual value obtained by the inverse transformation unit 225 witha prediction value obtained by the prediction unit 250.

Meanwhile, the filtering unit 230 performs filtering on a picture toimprove image quality. This may include a deblocking filter for reducingblock distortion and/or an adaptive loop filter for removing distortionof the entire picture. The filtered picture is outputted or stored inthe DPB 256 for use as a reference picture for the next picture.

The prediction unit 250 includes an intra prediction unit 252 and aninter prediction unit 254. The prediction unit 250 generates aprediction picture by using the encoding type decoded through theentropy decoding unit 210 described above, transform coefficients foreach region, and intra/inter encoding information. In order toreconstruct a current block in which decoding is performed, a decodedregion of the current picture or other pictures including the currentblock may be used. A picture (or, tile/slice) for which only the currentpicture is used for reconstruction, that is, for which only intraprediction is performed for reconstruction, is called an intra pictureor an I picture (or, tile/slice), and a picture (or, tile/slice) forwhich both intra prediction and inter prediction can be performed forreconstruction is called an inter picture (or, tile/slice). In order topredict sample values of each block among inter pictures (or,tiles/slices), a picture (or, tile/slice) using up to one motion vectorand a reference picture index is called a predictive picture or Ppicture (or, tile/slice), and a picture (or tile/slice) using up to twomotion vectors and a reference picture index is called a bi-predictivepicture or a B picture (or tile/slice). In other words, the P picture(or, tile/slice) uses up to one motion information set to predict eachblock, and the B picture (or, tile/slice) uses up to two motioninformation sets to predict each block. Here, the motion information setincludes one or more motion vectors and one reference picture index.

The intra prediction unit 252 generates a prediction block using theintra encoding information and reconstructed samples in the currentpicture. As described above, the intra coding information can include atleast one of the intra prediction mode, the most probable mode (MPM)flag, and the MPM index. The intra prediction unit 252 predicts pixelvalues of the current block by using reconstructed pixels located on theleft of and/or above the current block as reference pixels. According toan embodiment, the reference pixels may be pixels adjacent to a leftboundary and/or pixels adjacent to an above boundary of the currentblock. According to another embodiment, the reference pixels may bepixels adjacent within a preset distance from the left boundary of thecurrent block among pixels of neighboring blocks of the current blockand/or pixels adjacent within a preset distance from the above boundaryof the current block. In this case, the neighboring blocks of thecurrent block may include at least one of a left L block, an above Ablock, a below left BL block, an above right AR block, or an above leftAL block adjacent to the current block.

The inter prediction unit 254 generates a prediction block usingreference pictures and inter encoding information stored in the DPB 256.The inter coding information may include motion information (referencepicture index, motion vector information, etc.) of the current block forthe reference block. Inter prediction may include L0 prediction, L1prediction, and bi-prediction. L0 prediction means prediction using onereference picture included in the L0 picture list, and L1 predictionmeans prediction using one reference picture included in the L1 picturelist. For this, one set of motion information (e.g., motion vector andreference picture index) may be required. In the bi-prediction method,up to two reference regions may be used, and the two reference regionsmay exist in the same reference picture or may exist in differentpictures. That is, in the bi-prediction method, up to two sets of motioninformation (e.g., a motion vector and a reference picture index) may beused and two motion vectors may correspond to the same reference pictureindex or different reference picture indexes. In this case, thereference pictures may be displayed (or outputted) both before and afterthe current picture in time aspect.

The inter prediction unit 254 can obtain the reference block of thecurrent block by using the motion vector and the reference pictureindex. The reference block exists in the reference picture correspondingto the reference picture index. In addition, a pixel value of a blockspecified by the motion vector or an interpolated value thereof can beused as a predictor of the current block. For motion prediction withpixel accuracy in units of sub-pels, for example, an 8-tap interpolationfilter can be used for a luma signal and a 4-tap interpolation filtercan be used for a chroma signal. However, the interpolation filter formotion prediction in units of sub-pels is not limited thereto. Asdescribed above, the inter prediction unit 254 performs motioncompensation for predicting the texture of the current unit from thepreviously reconstructed picture using motion information.

The reconstructed video picture is generated by adding the predict valueoutputted from the intra prediction unit 252 or the inter predictionunit 254 and the residual value outputted from the inversetransformation unit 225. That is, the video signal decoding apparatus200 reconstructs the current block using the prediction block generatedby the prediction unit 250 and the residual obtained from the inversetransformation unit 225.

Meanwhile, the block diagram of FIG. 2 shows a decoding apparatus 200according to an embodiment of the present invention, and separatelydisplayed blocks logically distinguish and show the elements of thedecoding apparatus 200. Accordingly, the elements of the above-describeddecoding apparatus 200 may be mounted as one chip or as a plurality ofchips depending on the design of the device. According to an embodiment,the operation of each element of the above-described decoding apparatus200 may be performed by a processor (not shown).

FIG. 3 illustrates an embodiment in which a coding tree unit (CTU) issplit into coding units (CUs) in a picture. In the coding process of avideo signal, a picture may be split into a sequence of coding treeunits (CTUs). The coding tree unit is composed of an N×N block of lumasamples and two blocks of chroma samples corresponding thereto. Thecoding tree unit can be split into a plurality of coding units. Thecoding unit refers to a basic unit for processing a picture in theprocess of processing the video signal described above, that is,intra/inter prediction, transformation, quantization, and/or entropycoding. The size and shape of the coding unit in one picture may not beconstant. The coding unit may have a square or rectangular shape. Therectangular coding unit (or rectangular block) includes a verticalcoding unit (or vertical block) and a horizontal coding unit (orhorizontal block). In the present specification, the vertical block is ablock whose height is greater than the width, and the horizontal blockis a block whose width is greater than the height. Further, in thisspecification, a non-square block may refer to a rectangular block, butthe present invention is not limited thereto. The encoding device 100and the decoding device 200 have been described as above. The device forprocessing the video signal described below can include at least one ofthe encoding device 100 and the decoding device 200.

Referring to FIG. 3, the coding tree unit is first split into a quadtree (QT) structure. That is, one node having a 2N×2N size in a quadtree structure may be split into four nodes having an N×N size. In thepresent specification, the quad tree may also be referred to as aquaternary tree. Quad tree split can be performed recursively, and notall nodes need to be split with the same depth.

Meanwhile, the leaf node of the above-described quad tree may be furthersplit into a multi-type tree (MTT) structure. According to an embodimentof the present invention, in a multi-type tree structure, one node maybe split into a binary or ternary tree structure of horizontal orvertical division. That is, in the multi-type tree structure, there arefour split structures such as vertical binary split, horizontal binarysplit, vertical ternary split, and horizontal ternary split. Accordingto an embodiment of the present invention, in each of the treestructures, the width and height of the nodes may all have powers of 2.For example, in a binary tree (BT) structure, a node of a 2N×2N size maybe split into two N×2N nodes by vertical binary split, and split intotwo 2N×N nodes by horizontal binary split. In addition, in a ternarytree (TT) structure, a node of a 2N×2N size is split into (N/2)×2N,N×2N, and (N/2)×2N nodes by vertical ternary split, and split into2N×(N/2), 2N×N, and 2N×(N/2) nodes by horizontal ternary split. Thismulti-type tree split can be performed recursively.

The leaf node of the multi-type tree can be a coding unit. If the codingunit is not too large for the maximum transform length, thecorresponding coding unit is used as a unit of prediction and transformwithout further splitting. Meanwhile, in the quad tree and multi-typetree described above, at least one of the following parameters may bepredefined or transmitted through an RBSP of higher level sets such asPPS, SPS, or VPS. 1) CTU size: root node size of quad tree, 2) minimumQT size MinQtSize: minimum allowed QT leaf node size, 3) maximum BT sizeMaxBtSize: maximum allowed BT root node size, 4) Maximum TT sizeMaxTtSize: maximum allowed TT root node size, 5) Maximum MTT depthMaxMttDepth: maximum allowed depth of MTT split from QT's leaf node, 6)Minimum BT size MinBtSize: minimum allowed BT leaf node size, 7) MinimumTT size MinTtSize: minimum allowed TT leaf node size.

FIG. 4 shows an embodiment of a method for signaling the split of a quadtree and a multi-type tree. Preset flags may be used to signal the splitof the above-described quad tree and multi-type tree. Referring to FIG.4, at least one of a flag ‘qt_split_flag’ indicating whether to splitthe quad tree node, a flag ‘mtt_split_flag’ indicating whether to splitthe multi-type tree node, a flag ‘mtt_split_vertical_flag’ indicating asplit direction of a multi-type tree node, or a flag‘mtt_split_binary_flag’ indicating a split shape of a multi-type treenode may be used.

According to an embodiment of the present invention, the coding treeunit is a root node of a quad tree, and can be first split into a quadtree structure. In the quad tree structure, ‘qt_split_flag’ is signaledfor each node ‘QT_node’. If the value of ‘qt_split_flag’ is 1, the nodeis split into 4 square nodes, and if the value of ‘qt_split_flag’ is 0,the corresponding node becomes the leaf node ‘QT_leaf_node’ of the quadtree.

Each quad tree leaf node ‘QT_leaf_node’ may be further split into amulti-type tree structure. In the multi-type tree structure,‘mtt_split_flag’ is signaled for each node ‘MTT_node’. When the value of‘mtt_split_flag’ is 1, the corresponding node is split into a pluralityof rectangular nodes, and when the value of ‘mtt_split_flag’ is 0, thecorresponding node is a leaf node ‘MTT leaf node’ of the multi-typetree. When the multi-type tree node ‘MTT_node’ is split into a pluralityof rectangular nodes (i.e., when the value of ‘mtt_split_flag’ is 1),‘mtt_split_vertical_flag’ and ‘mtt_split_binary_flag’ for the node‘MTT_node’ may be additionally signaled. When the value of‘mtt_split_vertical_flag’ is 1, vertical split of node ‘MTT_node’ isindicated, and when the value of ‘mtt_split_vertical_flag’ is 0,horizontal split of node ‘MTT_node’ is indicated. In addition, when thevalue of ‘mtt_split_binary_flag’ is 1, the node ‘MTT_node’ is split into2 rectangular nodes, and when the value of ‘mtt_split_binary_flag’ is 0,the node ‘MTT_node’ is split into 3 rectangular nodes.

FIGS. 5 and 6 illustrate an intra prediction method according to anembodiment of the present disclosure in more detail. As described above,the intra prediction unit predicts pixel values of the current block byusing reconstructed pixels located on the left of and/or above thecurrent block as reference pixels.

First, FIG. 5 illustrates an embodiment of reference samples used forprediction of the current block in the intra prediction mode. Accordingto an embodiment, the reference pixels may be pixels adjacent to a leftboundary and/or pixels adjacent to an above boundary of the currentblock. As illustrated in FIG. 5, when the size of the current block isW×H and pixels of a single reference line adjacent to the current blockare used for intra prediction, reference pixels may be set using up to(2 W+2H+1) adjacent pixels located on the left of and/or above thecurrent block. Meanwhile, according to an additional embodiment of thepresent disclosure, pixels of multiple reference lines may be used forintra prediction of the current block. The multiple reference lines maybe composed of n lines located within a preset range from the currentblock. According to an embodiment, when pixels of the multiple referencelines are used for intra prediction, separate index informationindicating lines to be set as reference pixels may be signaled. When atleast some adjacent pixels to be used as the reference pixels have notyet been reconstructed, the intra prediction unit may obtain thereference pixels by performing a reference sample padding processaccording to a preset rule. In addition, the intra prediction unit mayperform a reference sample filtering process to reduce an intraprediction error. That is, the reference pixels may be obtained byperforming filtering on adjacent pixels and/or pixels obtained by thereference sample padding process. The intra prediction unit predicts thepixels of the current block using the reference pixels obtained in thisway.

Next, FIG. 6 shows an embodiment of prediction modes used for intraprediction. For intra prediction, intra prediction mode informationindicating an intra prediction direction may be signaled. The intraprediction mode information indicates one of a plurality of intraprediction modes included in the intra prediction mode set. When thecurrent block is an intra prediction block, the decoder receives intraprediction mode information of the current block from the bitstream. Theintra prediction unit of the decoder performs intra prediction on thecurrent block based on the extracted intra prediction mode information.

According to an embodiment of the present invention, the intraprediction mode set may include all intra prediction modes used in intraprediction (e.g., a total of 67 intra prediction modes). Morespecifically, the intra prediction mode set may include a planar mode, aDC mode, and a plurality (e.g., 65) of angle modes (i.e., directionalmodes). Each intra prediction mode may be indicated through a presetindex (i.e., intra prediction mode index). For example, as shown in FIG.6, the intra prediction mode index 0 indicates a planar mode, and theintra prediction mode index 1 indicates a DC mode. Also, the intraprediction mode indexes 2 to 66 may indicate different angle modes,respectively. The angle modes respectively indicate angles which aredifferent from each other within a preset angle range. For example, theangle mode may indicate an angle within an angle range (i.e., a firstangular range) between 45 degrees and −135 degrees clockwise. The anglemode may be defined based on the 12 o'clock direction. In this case, theintra prediction mode index 2 indicates a horizontal diagonal (HDIA)mode, the intra prediction mode index 18 indicates a horizontal(Horizontal, HOR) mode, the intra prediction mode index 34 indicates adiagonal (DIA) mode, the intra prediction mode index 50 indicates avertical (VER) mode, and the intra prediction mode index 66 indicates avertical diagonal (VDIA) mode.

Meanwhile, the preset angle range may be set differently depending on ashape of the current block. For example, if the current block is arectangular block, a wide angle mode indicating an angle exceeding 45degrees or less than −135 degrees in a clockwise direction may beadditionally used. When the current block is a horizontal block, anangle mode may indicate an angle within an angle range (i.e., a secondangle range) between (45+offset1) degrees and (−135+offset1) degrees ina clockwise direction. In this case, angle modes 67 to 76 outside thefirst angle range may be additionally used. In addition, if the currentblock is a vertical block, the angle mode may indicate an angle withinan angle range (i.e., a third angle range) between (45−offset2) degreesand (−135−offset2) degrees in a clockwise direction. In this case, anglemodes −10 to −1 outside the first angle range may be additionally used.According to an embodiment of the present disclosure, values of offset1and offset2 may be determined differently depending on a ratio betweenthe width and height of the rectangular block. In addition, offset1 andoffset2 may be positive numbers.

According to a further embodiment of the present invention, a pluralityof angle modes configuring the intra prediction mode set may include abasic angle mode and an extended angle mode. In this case, the extendedangle mode may be determined based on the basic angle mode.

According to an embodiment, the basic angle mode is a mode correspondingto an angle used in intra prediction of the existing high efficiencyvideo coding (HEVC) standard, and the extended angle mode may be a modecorresponding to an angle newly added in intra prediction of the nextgeneration video codec standard. More specifically, the basic angle modemay be an angle mode corresponding to any one of the intra predictionmodes {2, 4, 6, 66}, and the extended angle mode may be an angle modecorresponding to any one of the intra prediction modes {3, 5, 7, . . . ,65}. That is, the extended angle mode may be an angle mode between basicangle modes within the first angle range. Accordingly, the angleindicated by the extended angle mode may be determined based on theangle indicated by the basic angle mode.

According to another embodiment, the basic angle mode may be a modecorresponding to an angle within a preset first angle range, and theextended angle mode may be a wide angle mode outside the first anglerange. That is, the basic angle mode may be an angle mode correspondingto any one of the intra prediction modes {2, 3, 4, . . . , 66}, and theextended angle mode may be an angle mode corresponding to any one of theintra prediction modes {−10, −9, . . . , −1} and {67, 68, . . . , 76}.The angle indicated by the extended angle mode may be determined as anangle on a side opposite to the angle indicated by the correspondingbasic angle mode. Accordingly, the angle indicated by the extended anglemode may be determined based on the angle indicated by the basic anglemode. Meanwhile, the number of extended angle modes is not limitedthereto, and additional extended angles may be defined according to thesize and/or shape of the current block. For example, the extended anglemode may be defined as an angle mode corresponding to any one of theintra prediction modes {−14, −13, . . . , −1} and {67, 68, . . . , 80}.Meanwhile, the total number of intra prediction modes included in theintra prediction mode set may vary depending on the configuration of thebasic angle mode and extended angle mode described above.

In the embodiments described above, the spacing between the extendedangle modes may be set based on the spacing between the correspondingbasic angle modes. For example, the spacing between the extended anglemodes {3, 5, 7, . . . , 65} may be determined based on the spacingbetween the corresponding basic angle modes {2, 4, 6, . . . , 66}. Inaddition, the spacing between the extended angle modes {−10, −9, . . . ,−1} may be determined based on the spacing between corresponding basicangle modes {56, 57, . . . , 65} on the opposite side, and the spacingbetween the extended angle modes {67, 68, . . . , 76} may be determinedbased on the spacing between the corresponding basic angle modes {3, 4,. . . , 12} on the opposite side. The angular spacing between theextended angle modes may be set to be the same as the angular spacingbetween the corresponding basic angle modes. In addition, the number ofextended angle modes in the intra prediction mode set may be set to beless than or equal to the number of basic angle modes.

According to an embodiment of the present disclosure, the extended anglemode may be signaled based on the basic angle mode. For example, thewide angle mode (i.e., the extended angle mode) may replace at least oneangle mode (i.e., the basic angle mode) within the first angle range.The basic angle mode to be replaced may be a corresponding angle mode ona side opposite to the wide angle mode. That is, the basic angle mode tobe replaced is an angle mode that corresponds to an angle in an oppositedirection to the angle indicated by the wide angle mode or thatcorresponds to an angle that differs by a preset offset index from theangle in the opposite direction. According to an embodiment of thepresent disclosure, the preset offset index is 1. The intra predictionmode index corresponding to the basic angle mode to be replaced may beremapped to the wide angle mode to signal the corresponding wide anglemode. For example, the wide angle modes {−10, −9, . . . , −1} may besignaled by the intra prediction mode indices {57, 58, . . . , 66},respectively, and the wide angle modes {67, 68, . . . , 76} may besignaled by the intra prediction mode indices {2, 3, . . . , 11},respectively. In this way, the intra prediction mode index for the basicangle mode signals the extended angle mode, and thus the same set ofintra prediction mode indices may be used for signaling the intraprediction mode even if the configuration of the angle modes used forintra prediction of each block are different from each other.Accordingly, signaling overhead due to a change in the intra predictionmode configuration may be minimized.

Meanwhile, whether or not to use the extended angle mode may bedetermined based on at least one of the shape and size of the currentblock. According to an embodiment, if the size of the current block isgreater than a preset size, the extended angle mode may be used forintra prediction of the current block, otherwise, only the basic anglemode may be used for intra prediction of the current block. According toanother embodiment, if the current block is a block other than a square,the extended angle mode may be used for intra prediction of the currentblock, and if the current block is a square block, only the basic anglemode may be used for intra prediction of the current block.

The intra prediction unit determines reference pixels and/orinterpolated reference pixels to be used for intra prediction of thecurrent block based on intra prediction mode information of the currentblock. When the intra prediction mode index indicates a specific anglemode, the reference pixel corresponding to the specific angle from thecurrent pixel of the current block or the interpolated reference pixelis used for prediction of the current pixel. Therefore, different setsof reference pixels and/or interpolated reference pixels may be used forintra prediction according to the intra prediction mode. After intraprediction of the current block is performed using the reference pixelsand intra prediction mode information, the decoder reconstructs pixelvalues of the current block by adding the residual signal of the currentblock obtained from the inverse transformation unit and the intrapredictor of the current block.

FIG. 7 is a flowchart illustrating an operation of a device forprocessing a video signal according to an embodiment of the presentdisclosure.

Each step of FIG. 7 will be described in detail together with FIGS. 9 to13.

FIG. 8 is a diagram illustrating a prediction mode and a quantizedresidual signal of block DPCM (BDPCM) according to an embodiment of thepresent disclosure.

The block-based delta pulse code modulation (BDPCM) may be one of theintra prediction methods. The BDPCM may use two intra prediction modes.Among general intra prediction modes, a vertical prediction mode and ahorizontal prediction mode may be used. When the total number of 67intra prediction modes is used, an index of the vertical prediction modemay be number 50 and an index of the horizontal prediction mode may benumber 18. When using the BDPCM, one of two modes may be signaled. Whenthe BDPCM is applied to the current coding block, unfiltered samples maybe used as the reference samples. When the vertical prediction mode isapplied to the BDPCM, samples corresponding to the width of the currentcoding block may be used, and each sample may be predicted with the samevalue in the corresponding column. When the horizontal prediction modeis applied to the BDPCM, samples corresponding to the height of thecurrent coding block may be used, and each sample may be predicted withthe same value for all samples in a corresponding row. The block towhich the BDPCM is applied may be informed to the decoder by omitting atransform process and performing residual signal coding. “A.BDPCMprediction mode” in FIG. 8 is a method for coding a residual signal.

The size of the coding block may be M(rows)×N(cols) and r_(i,j),0≤i≤M−1, 0≤j≤N−1 may be a prediction residual signal. The predictionresidual signal may indicate a difference between an original samplevalue and a prediction value predicted using the reference sample.Q(r_(i,j)), 0≤i≤M−1, 0≤j≤N−1 may be a quantized prediction residualsignal in which the prediction residual signal is quantized.

When vertical BDPCM is applied, a final value may be generated asfollows.

${\overset{\sim}{r}}_{i,j} = \left\{ \begin{matrix}{{Q\left( r_{i,j} \right)},} & {{i = 0},{0 \leq j \leq \left( {N - 1} \right)}} \\{{{Q\left( r_{i,j} \right)} - {Q\left( r_{{({i - 1})},j} \right)}},} & {{1 \leq i \leq \left( {M - 1} \right)},{0 \leq j \leq \left( {N - 1} \right)}}\end{matrix} \right.$

When horizontal direction BDPCM is applied, the final value may begenerated as follows.

${\overset{\sim}{r}}_{i,j} = \left\{ \begin{matrix}{{Q\left( r_{i,j} \right)},} & {{0 \leq i \leq \left( {M - 1} \right)},{j = 0}} \\{{{Q\left( r_{i,j} \right)} - {Q\left( r_{i,{({j - 1})}} \right)}},} & {{0 \leq i \leq \left( {M - 1} \right)},{1 \leq j \leq \left( {N - 1} \right)}}\end{matrix} \right.$

The decoder may calculate in an opposite manner to the encoder togenerate a quantized residual signal and add the quantized residualsignal to a predicted value to create a reconstructed signal.

FIG. 9 is a diagram illustrating a BDPCM flag defined in a sequenceparameter set.

At higher levels, the BDPCM flag may be defined and the correspondingfunction may be turned on/off. If the levels are listed in the order ofhigher level, the levels may be divided into a video parameter set, asequence parameter set, a parameter set, etc. In the present disclosure,the flag is defined in the sequence parameter set (SPS). However, thepresent invention is not limited thereto. BDPCM enable informationsps_bdpcm_enabled_flag indicates whether or not the BDPCM is enabled.The device for processing the video signal may perform step 710 ofparsing the BDPCM enable information sps_bdpcm_enabled_flag from thebitstream. If the BDPCM enable information sps_bdpcm_enabled_flag isequal to 1, it indicates that the BDPCM is enabled. If the value of theBDPCM enable information sps_bdpcm_enabled_flag is equal to 0, it mayindicate that the BDPCM is not enabled. The value indicates that theBDPCM is enabled or disabled may be defined conversely, and may indicatethat the BDPCM is enabled or disabled in any form.

As described above, in FIG. 9, the BDPCM enable informationsps_bdpcm_enabled_flag is defined in units of sequences, but is notlimited thereto. The BDPCM enable information sps_bdpcm_enabled_flag maybe signaled in at least one of units of coding tree units (CTUs), unitsof slices, units of tiles, units of tile groups, units of pictures,units of subpictures, units of sequences, or units of videos. When theBDPCM enable information sps_bdpcm_enabled_flag is signaled in units ofcoding tree units (CTUs), units of slices, units of tiles, units of tilegroups, units of pictures, units of subpictures, units of sequences, orunits of videos, the name of the BDPCM enable informationsps_bdpcm_enabled_flag may be changed. But the function thereof may bethe same.

Referring to FIG. 9, the BDPCM enable information sps_bdpcm_enabled_flagmay be parsed from the bitstream without special conditions. However,the present invention is not limited thereto. The device for processingthe video signal may parse transform skip enable informationsps_transform_skip_enabled_flag indicating whether or not transform skipinformation transform_skip_flag exists in a transform unit from thebitstream. The transform unit is a unit for transforming pixels includedin the coding block, and may be included in the coding block. Inaddition, the current transform unit may be included in the currentblock. The transform skip enable informationsps_transform_skip_enabled_flag may be information indicating whether ornot transform skip is to be used. The transform skip enable informationsps_transform_skip_enabled_flag may be signaled in units of sequences.When the transform skip enable informationsps_transform_skip_enabled_flag is 1, it indicates that the transformskip information transform_skip_flag exists, and the device forprocessing the video signal may parse the transform skip informationtransform_skip_flag from the bitstream later. When the transform skipenable information sps_transform_skip_enabled_flag is 0, it may indicatethat the transform skip information transform_skip_flag does not exist,and the device for processing the video signal may not parse thetransform skip information transform_skip_flag from the bitstream later.The fact that the decoder of the device for processing the video signaldoes not parse transform skip information may indicate that the encoderof the device for processing the video signal does not generate thetransform skip information. According to the present disclosure, whenthe transform skip enable information sps_transform_skip_enabled_flag is1, the device for processing the video signal may parse the BDPCM enableinformation sps_bdpcm_enabled_flag from the bitstream.

FIG. 10 is a diagram illustrating a part of a coding unit syntaxstructure.

FIG. 10 illustrates a structure of information required in units ofcoding blocks to be predicted, and the encoder may signal according tothe corresponding condition, and the decoder may also parse and obtaininformation from the bitstream according to the corresponding condition.If pcm_flag[x0][y0] at the upper-left coordinates (x0, y0) of thecorresponding coding block is equal to a value of 0 indicating that apcm mode is not applied, it may be checked whether treeType isSINGLE_TREE or DUAL_TREE_LUMA. When the treeType is SINGLE_TREE orDUAL_TREE_LUMA, the device for processing the video signal may parseintra BDPCM information intra_bdpcm_flag from the bitstream. The intraBDPCM information intra_bdpcm_flag may indicate whether or not the BDPCMis applied to the current block. When the intra BDPCM informationintra_bdpcm_flag is 1, it may mean that the BDPCM is applied to thecurrent block. In addition, when the intra BDPCM informationintra_bdpcm_flag is 0, it may mean that BDPCM is not applied to thecurrent block. However, the present invention is not limited thereto.When the intra BDPCM information intra_bdpcm_flag is 0, it may mean thatthe BDPCM is applied to the current block, and when the intra BDPCMinformation intra_bdpcm_flag is 1, it may mean that the BDPCM is notapplied to the current block.

The intra BDPCM information intra_bdpcm_flag may be expressed in aformat such as intra_bdpcm_flag[x0][y0]. Here, x0 and y0 may becoordinates of the current block. More specifically, x0 and y0 may becoordinates of the above left pixel of the current block

In order for the intra BDPCM information intra_bdpcm_flag to be parsed,the conditions for the width and height of the corresponding coding unitand the enable/disable conditions of the BDPCM enable informationsps_bdpcm_enabled_flag may have to be satisfied. For example, both thewidth and the height are less than or equal to 32, and the BDPCM enableinformation sps_bdpcm_enabled_flag may have to be equal to 1 indicatingthat the BDPCM enable information sps_bdpcm_enabled_flag is enabled. Ifthe BDPCM enable information sps_bdpcm_enabled_flag is equal to 1indicating that the intra BDPCM information intra_bdpcm_flag[x0][y0] isused, intra BDPCM direction information intra_bdpcm_dir_flag[x0][y0])may be signaled/parsed. The corresponding flag may indicate a predictionmode applied to the BDPCM. The prediction mode may be one of ahorizontal direction prediction mode number 18 and a vertical directionprediction mode number 50. If the intra BDPCM direction informationintra_bdpcm_dir_flag[x0][y0] value is 0, the intra prediction modenumber 18 may be indicated, and if the intra BDPCM direction informationintra_bdpcm_dir_flag[x0][y0] value is 1, the intra prediction modenumber 50 may be indicated. Whether or not to use a BDPCM function inthe coding block may be determined by the value ofsps_bdpcm_enabled_flag defined at the higher level.

FIG. 11 is a diagram illustrating a part of coding unit syntax andincludes a size variable of a block to which BDPCM is applied.

It is also possible to variably change the size of the block to whichthe BDPCM is applied through a preset variable or to apply the size ofthe block to which the BDPCM is applied together with other presetvariables. When the BDPCM enable information sps_bdpcm_enabled_flagindicates that the BDPCM is enabled, the width of the current block isless than or equal to the first value Value1, and the height of thecurrent block is less than or equal to the second value Value2, thedevice for processing the video signal may perform step 720 of parsingthe intra BDPCM information intra_bdpcm_flag indicating whether or notthe BDPCM is to be applied to the current block from the bitstream.

More specifically, the condition for signaling/parsing the intra BDPCMinformation intra_bdpcm_flag[x0][y0] may be a case in which a codingblock width cbWidth is equal to or less than the first value Value1, ora coding block height cbHeight is equal to or less than the second valueValue2. Value1 and Value2 may be the same or different values. Forexample, the first value Value1 and the second value Value2 may be themaximum block size MaxTsSize to which transform skip is applied. Themaximum block size MaxTsSize to which transform skip is applied may bethe maximum block size that allows transform skip. The maximum blocksize MaxTsSize that allows transform skip may be a value between 4 and32. The maximum block size MaxTsSize that allows transform skip may bedefined as follows. A syntax variable log2_transform_skip_max_size_minus2 indicates the maximum block size towhich transform skip is applied, and the value thereof may be between 0and 3. If the corresponding variable log2_transform_skip_max_size_minus2 does not exist, the value may beinferred as 0. The maximum block size MaxTsSize which is a variable thatallows transform skip is set, using the corresponding variable log2_transform_skip_max_size_minus, as 1<<(log2_transform_skip_max_size_minus2+2).

Alternatively, it is possible to set a separate block size variable forthe BDPCM without using log 2_transform_skip_max_size_minus2 related tothe transform skip condition. For example, a variable MaxBdpcmSize maybe used. The size of MaxBdpcmSize may be set based on a value signaledas log 2_bdpcm_max_size_minus2. MaxBdpcmSize may be set to 1<<(log2_transform_skip_max_size_minus2+2). The log2_transform_skip_max_size_minus2 may be the maximum value at 0, and themaximum value may be one of values of 7, 6, 5, 4, 3, 2, and 1. When log2_transform_skip_max_size_minus2 related to the transform skip conditionis used, no additional variable setting is required, and thus there maybe no information to be additionally transmitted from the encoder to thedecoder. Otherwise, when log 2_bdpcm_max_size_minus2 is used, anadditional variable such as log 2_bdpcm_max_size_minus2 is required, butthe degree of freedom of the size of the block may increase. It is alsopossible to set Value1 and Value2 differently in a similar manner asdescribed above.

The device for processing the video signal may includesps_bdpcm_enabled_flag in a signaling/parsing condition of the intraBDPCM information intra_bdpcm_flag. It may be likesps_bdpcm_enabled_flag && cbWidth<=Value1 && cbHeight<=Value2.

More specifically, FIG. 11 illustrates the structure of informationrequired in units of coding blocks to be predicted, and the encoder maysignal according to the corresponding condition, and the decoder mayalso parse and obtain information from the bitstream according to thecorresponding condition. Referring to line 1110, the device forprocessing the video signal may determine whether or notpcm_flag[x0][y0] at the above left coordinates (x0, y0) of thecorresponding coding block indicates that a pcm mode is not applied.Referring to line 1120, if pcm_flag[x0][y0] at the above leftcoordinates (x0, y0) of the coding block is equal to a value of 0indicating that the pcm mode is not applied, the device for processingthe video signal may check whether treeType is SINGLE_TREE orDUAL_TREE_LUMA. In addition, when treeType is SINGLE_TREE orDUAL_TREE_LUMA, the device for processing the video signal may determinewhether or not the BDPCM enable information sps_bdpcm_enabled_flagindicates that the BDPCM is enabled, whether or not the width of thecurrent block is less than or equal to the first value Value1, orwhether or not the height of the current block is less than or equal tothe second value Value2. In line 1130, whether or not the BDPCM enableinformation sps_bdpcm_enabled_flag indicates the BDPCM is enabled is notdescribed, but whether or not the BDPCM enable informationsps_bdpcm_enabled_flag indicates that the BDPCM is enabled may also bedetermined. Here, the first value and the second value area each may bethe maximum block size MaxTsSize that allows transform skip. Since themaximum block size MaxTsSize that allows transform skip has already beendescribed, a redundant description thereof will be omitted.

Referring to line 1140, when the BDPCM enable informationsps_bdpcm_enabled_flag indicates that the BDPCM is enabled, the width ofthe current block is less than or equal to the first value, and theheight of the current block is less than or equal to the second value,the device for processing the video signal may perform step 720 ofparsing the intra BDPCM information intra_bdpcm_flag from the bitstream.

The intra BDPCM information intra_bdpcm_flag may indicate whether or notthe BDPCM is applied to the current block. The intra BDPCM informationintra_bdpcm_flag may be expressed in a format such asintra_bdpcm_flag[x0][y0]. Here, x0 and y0 may be coordinates of thecurrent block. More specifically, x0 and y0 may be coordinates of theabove left pixel of the current block.

Referring to line 1150, the device for processing the video signal maydetermine whether or not the intra BDPCM informationintra_bdpcm_flag[x0][y0] indicates that the BDPCM is used. Referring toline 1160, when the intra BDPCM information intra_bdpcm_flag indicatesthat the BDPCM is applied to the current block, step 730 of parsing theintra BDPCM direction information intra_bdpcm_dir_flag for the currentblock from the bitstream may be performed. The intra BDPCM directioninformation intra_bdpcm_dir_flag may indicate either a horizontaldirection or a vertical direction. For example, when the intra BDPCMdirection information intra_bdpcm_dir_flag is 0, it may indicate thehorizontal direction. In addition, when the intra BDPCM directioninformation intra_bdpcm_dir_flag is 1, it may indicate the verticaldirection. However, the present invention is not limited thereto. Whenthe intra BDPCM direction information intra_bdpcm_dir_flag is 1, it mayindicate the horizontal mode, and when the intra BDPCM directioninformation intra_bdpcm_dir_flag is 0, it may indicate the verticalmode.

The intra BDPCM direction information intra_bdpcm_dir_flag may indicatea prediction mode applied to the BDPCM. The prediction mode may beeither the intra prediction mode number 18 or the intra prediction modenumber 50. The intra prediction mode number 18 may be a horizontalprediction mode, and or the intra prediction mode number 50 may be avertical prediction mode. If the intra BDPCM direction informationintra_bdpcm_dir_flag[x0][y0] value is 0, the BDPCM prediction directionmay indicate the horizontal direction, and when the intra BDPCMdirection information intra_bdpcm_dir_flag[x0][y0] value is 1, the BDPCMprediction direction may indicate the vertical direction. In addition,if the value of the intra BDPCM direction informationintra_bdpcm_dir_flag[x0][y0] is 0, the intra prediction mode number 18may be indicated, and if the value of the intra BDPCM directioninformation intra_bdpcm_dir_flag[x0][y0] is 1, the intra prediction modenumber 50 may be indicated. Whether or not the corresponding function isused in the coding block may be determined by the value of the BDPCMenable information sps_bdpcm_enabled_flag defined at the higher level.

The intra BDPCM information intra_bdpcm_flag and the intra BDPCMdirection information intra_bdpcm_dir_flag may be parsed for each chromacomponent and each luma component. The intra BDPCM informationintra_bdpcm_flag and the intra BDPCM direction informationintra_bdpcm_dir_flag may be parsed for the luma component regardless ofthe chroma component. That is, the device for processing the videosignal may parse the intra BDPCM information intra_bdpcm_luma_flag forthe luma component or the intra BDPCM direction informationintra_bdpcm_luma_dir_flag for the luma component in the same manner asdescribed above, and may parse the intra BDPCM informationintra_bdpcm_chroma_flag for the chroma component or the intra BDPCMdirection information intra_bdpcm_chroma_dir_flag for the chromacomponent in a similar manner.

The process of obtaining the intra BDPCM informationintra_bdpcm_luma_flag for the luma component and the intra BDPCMdirection information intra_bdpcm_luma_dir_flag for the luma componentmay be slightly different from the process of obtaining the intra BDPCMinformation intra_bdpcm_chroma_flag for the chroma component and theintra BDPCM direction information intra_bdpcm_chroma_dir_flag for thechroma component. This is because the current block of the lumacomponent and the current block of the chroma component may be differentfrom each other. More specifically, the size or position of the currentblock of the luma component may be different from the size or positionof the current block of the chroma component. When the BDPCM enableinformation sps_bdpcm_enabled_flag indicates that the BDPCM is enabled,the width of the current luma coding block is less than or equal to thefirst value, and the height of the current luma coding block is lessthan or equal to the second value, the device for processing the videosignal may parse the intra BDPCM information intra_bdpcm_luma_flag forthe luma component from the bitstream. Similarly, when the BDPCM enableinformation sps_bdpcm_enabled_flag indicates that the BDPCM is enabled,the width of the current chroma coding block is less than or equal tothe first value, and the height of the current chroma coding block isless than or equal to the second value, the device for processing thevideo signal may parse the intra BDPCM informationintra_bdpcm_chroma_flag for the chroma component from the bitstream. Inaddition, when the intra BDPCM information intra_bdpcm_luma_flag for theluma component indicates that BDPCM is applied to the current lumacoding block, the device for processing the video signal may perform astep of parsing the luma intra BDPCM direction informationintra_bdpcm_luma_dir_flag for the current luma coding block from thebitstream. Similarly, when the intra BDPCM informationintra_bdpcm_chroma_flag for the chroma component indicates that theBDPCM is applied to the current chroma coding block, the device forprocessing the video signal may perform a step of parsing the chromaintra BDPCM direction information intra_bdpcm_chroma_dir_flag for thecurrent chroma coding block from the bitstream. Here, the first valueand the second value may each be the maximum block size MaxTsSize thatallows transform skip.

In this disclosure, the intra BDPCM information intra_bdpcm_flag mayinclude the intra BDPCM information intra_bdpcm_luma_flag for the lumacomponent and the intra BDPCM information intra_bdpcm_chroma_flag forthe chroma component. In addition, in the present disclosure, the intraBDPCM direction information intra_bdpcm_dir_flag may include the intraBDPCM direction information intra_bdpcm_luma_dir_flag for the lumacomponent and the intra BDPCM direction informationintra_bdpcm_chroma_dir_flag for the chroma component.

The device for processing the video signal may perform step 740 ofreconstructing the current block based on the intra BDPCM directioninformation intra_bdpcm_dir_flag. Step 740 of reconstructing the currentblock based on the intra BDPCM direction informationintra_bdpcm_dir_flag has been described together with FIG. 8, and thus aredundant description thereof will be omitted.

FIG. 12 is a diagram illustrating a part of the transform unit syntax.

For the coding block to which BDPCM is applied, the residual signal maybe coded by the method described with reference to FIG. 8 without thetransform process. The syntax variable that prevents the transformprocess from being applied to the corresponding block may be transformskip information transform_skip_flag. That is, the transform skipinformation transform_skip_flag may indicate whether or not to apply thetransform to the corresponding block. Alternatively, when the transformskip information transform_skip_flag is equal to a predetermined value,the transform skip information transform_skip_flag may indicate that notransform is applied to the current block. When the transform skipinformation transform_skip_flag is 1, the transform may be skipped withrespect to the corresponding transform block. In addition, when thetransform skip information transform_skip_flag is 0, the transform maynot be skipped with respect to the corresponding transform block.However, the present invention is not limited thereto. When thetransform skip information transform_skip_flag is 0, the transform maybe skipped with respect to the corresponding transform block. Inaddition, when the transform skip information transform_skip_flag is 1,the transform may not be skipped with respect to the correspondingtransform block.

The transform skip information transform_skip_flag may be expressed in aformat such as transform_skip_flag[x0][y0] for each color component.Here, x0 and y0 may be the coordinates of the corresponding transformblock. More specifically, x0 and y0 may be the coordinates of the aboveleft pixel of the corresponding block. As already described, the currentblock may include at least one transform block. The encoder may performtransform in units of transform blocks, and the decoder may performinverse transform in units of transform blocks.

As a condition for signaling/parsing the transform skip informationtransform_skip_flag[x0][y0], first, whether a value oftu_cbf_luma[x0][y0] is 1, whether treeType is different from DUAL TYPETREE CHROMA, whether the width and height of the coding unit are lessthan or equal to 32, whether IntraSubPartitionsSplit[x0][y0] is equal toISP_NO_SPLIT, whether cu_sbt_flag is equal to 0, and whether the intraBDPCM information intra_bdpcm_flag[x0][y0] is equal to 0 may have to besatisfied. In addition, the condition transform_skip_enabled_flag &&tbWidth<=MaxTsSize && tbHeight<=MaxTsSize may have to be satisfied. ThetbWidth may be a variable representing the width of the transform block,and the tbHeight may be a variable representing the height of thetransform block.

The above conditions are exemplary, and some of the above conditions maybe replaced with other conditions or deleted. Other conditions may alsobe added. However, some of the above conditions may be maintained toincrease encoding or decoding efficiency of a video image. For example,as already described, since transform skip is applied to the codingblock to which the BDPCM is applied, it is possible to know applicationof transform skip by inferring without signaling/parsing separateinformation. That is, when the intra BDPCM information intra_bdpcm_flagindicates that the BDPCM is applied to the current block, the transformskip information transform_skip_flag indicating whether or not thetransform is not applied to the current block may not be parsed. Asalready described, when the intra BDPCM information intra_bdpcm_flag is1, it may indicate that the BDPCM is applied to the current block. Whenthe intra BDPCM information intra_bdpcm_flag indicates that the BDPCM isnot applied to the current block, the device for processing the videosignal may determine whether to parse the transform skip informationtransform_skip_flag by further determining at least one of theconditions described above.

When some of the above conditions are not satisfied, since the transformskip information transform_skip_flag is not parsed, a case where thetransform skip information transform_skip_flag[x0][y0] does not existmay occur. For example, when the intra BDPCM informationintra_bdpcm_flag indicates that BDPCM is applied to the current block,the transform skip information transform_skip_flag[x0][y0] may notexist. The device for processing the video signal may know whether ornot transform skip is applied by inferring transform_skip_flag based onthe intra BDPCM information intra_bdpcm_flag.

For example, if transform skip information transform_skip_flag[x0][y0]is absent and the intra BDPCM information intra_bdpcm_flag[x0][y0]) is1, the device for processing the video signal may infer the transformskip information transform_skip_flag[x0][y0] as a first inference value.Here, the fact that the intra BDPCM information intra_bdpcm_flag is 1may indicate that the BDPCM is applied to the current block. When thevalue of the transform skip information is the first inference value, itmay indicate that transform is not applied to a block corresponding tothe transform skip information.

In addition, if the transform skip informationtransform_skip_flag[x0][y0] is absent and the intra BDPCM informationintra_bdpcm_flag[x0][y0] is 0, the device for processing the videosignal may infer the transform skip informationtransform_skip_flag[x0][y0] as a second inference value. Here, the factthat the intra BDPCM information intra_bdpcm_flag is 0 may indicate thatthe BDPCM is not applied to the current block. When the value of thetransform skip information is the second inference value, it mayindicate that transform is applied to the block corresponding to thetransform skip information. Here, the first inference value may be 1,and the second inference value may be 0. However, the present inventionis not limited thereto, and the first inference value may be 0 and thesecond inference value may be 1.

If the transform skip information transform_skip_flag[x0][y0] of theblock to which the BDPCM is applied is 1, a residual_ts_coding( )function may be called. The residual signal transformed in FIG. 8 may becoded through this function. In addition, MinBdpcmSize conditions oftbWidth and tbHeight may be added in the same manner. The correspondingvalue may be signaled and calculated in a similar manner at a higherlevel. The MinBdpcmSize condition may be added and applied to thecondition illustrated in FIG. 13 as well.

FIG. 13 is a diagram illustrating signaling/parsing conditions of thetransform_skip_flag within a part of the transform unit syntax.

FIG. 13 is an embodiment similar to FIG. 12. Since transform skip isapplied to the coding block to which the BDPCM is applied, it ispossible to know application of transform skip by inferring withoutsignaling/parsing separate information. Accordingly, a conditionindicating that the BDPCM is not applied may be added to the conditionsfor signaling/parsing the transform_skip_flag.

As illustrated in FIG. 13, the device for processing the video signalmay use a condition such as (transform_skip_enabled_flag &&tbWidth<=MaxTsSize && tbHeight<=MaxTsSize && (!intra_bdpcm_flag[x0][y0])) as the condition for parsing the transformskip information transform_skip_flag. In addition, whentransform_skip_enabled_flag is equal to 1, tbWidth<=MaxTsSize,tbHeight<=MaxTsSize, and intra_bdpcm_flag[x0][y0] is equal to 0, thedevice for processing the video signal may parse the transform skipinformation transform_skip_flag. That is, it is possible to signal/parsetransform_skip_flag[x0][y0] only for the block to which the transformskip condition and the BDPCM are not applied.

The conditions for signaling/parsing the transform skip informationtransform_skip_flag[x0][y0] may be as follows. Referring to line 1310,the video signal processing device may check whether the value oftu_cbf_luma[x0][y0] is 1, whether treeType is different from DUAL TYPETREE CHROMA, whether the width tbWidth and height tbHeight of thetransform block are less than or equal to 32, whetherIntraSubPartitionsSplit[x0][y0] is equal to ISP_NO_SPLIT, whethercu_sbt_flag is equal to 0, and whether the intra BDPCM informationintra_bdpcm_flag[x0][y0] is equal to 0. As already described, the factthat the intra BDPCM information intra_bdpcm_flag is equal to 0 may meanthat the BDPCM is not applied to the current block. In addition,referring to line 1320, the device for processing the video signal maydetermine whether or not a condition transform_skip_enabled_flag &&tbWidth<=MaxTsSize && tbHeight<=MaxTsSize is satisfied.

The above conditions are exemplary, and some of the above conditions maybe replaced with other conditions or deleted. Other conditions may alsobe added. However, some of the above conditions may be maintained toincrease encoding or decoding efficiency of a video image. For example,as already described, since transform skip is applied to the codingblock to which the BDPCM is applied, separate information may not besignaled/parsed. That is, when the intra BDPCM informationintra_bdpcm_flag indicates that the BDPCM is applied to the currentblock, the transform skip information transform_skip_flag indicatingwhether or not the transform is not applied to the current block may notbe parsed. As already described, when the intra BDPCM informationintra_bdpcm_flag is 1, it may indicate that the BDPCM is applied to thecurrent block. When the intra BDPCM information intra_bdpcm_flagindicates that the BDPCM is not applied to the current block, the devicefor processing the video signal may determine whether to parse thetransform skip information transform_skip_flag by further determining atleast one of the conditions described above.

When some of the above conditions are not satisfied, the case where thetransform skip information transform_skip_flag[x0][y0] does not existmay occur. For example, when the intra BDPCM informationintra_bdpcm_flag indicates that BDPCM is applied to the current block,the transform skip information transform_skip_flag[x0][y0]) may notexist. The device for processing the video signal may know whether ornot transform skip is applied by inferring transform_skip_flag based onthe intra BDPCM information intra_bdpcm_flag. For example, if thetransform skip information transform_skip_flag[x0][y0] is absent and theintra BDPCM information intra_bdpcm_flag[x0][y0]) is 1, the device forprocessing the video signal may infer the transform skip informationtransform_skip_flag[x0][y0] as 1. Here, the fact that the intra BDPCMinformation intra_bdpcm_flag is 1 may indicate that the BDPCM is appliedto the current block. In contrast, if the transform skip informationtransform_skip_flag[x0][y0] is absent and the intra BDPCM informationintra_bdpcm_flag[x0][y0] is 0, the device for processing the videosignal may infer the transform skip informationtransform_skip_flag[x0][y0] as 0. Here, the fact that the intra BDPCMinformation intra_bdpcm_flag is 0 may indicate that the BDPCM is notapplied to the current block. As described above, since the encoder doesnot transmit redundant information and the decoder does not parse theredundant information, encoding/decoding efficiency may be increased.Since the encoder does not generate transform_skip_flag, encodingefficiency may be increased and a bitstream capacity may be reduced. Inaddition, the decoder may increase computing efficiency by inferringinformation without a parsing process.

The transform skip information transform_skip_flag may be parsed foreach chroma component and each luma component. The chroma components mayinclude Cb and Cr. The transform skip information transform_skip_flagmay be parsed for each Cb and each Cr. The transform skip informationtransform_skip_flag may be parsed for the luma component regardless ofthe chroma component. The transform skip information transform_skip_flagmay be parsed for the chroma component regardless of the luma component.The device for processing the video signal may obtain the transform skipinformation transform_skip_flag for the luma component and obtain thetransform skip information transform_skip_flag for the chroma component.In addition, when the transform skip information transform_skip_flag isabsent, the transform skip information transform_skip_flag may beinferred for each chroma component and each luma component. The devicefor processing the video signal may infer the transform skip informationtransform_skip_flag using the method as already described.Alternatively, the device for processing the video signal may infer thetransform skip information transform_skip_flag for the chroma componentby using the transform skip information transform_skip_flag for the lumacomponent.

FIG. 14 is a diagram illustrating a relationship between a block towhich the BDPCM is applied and an intra prediction mode variable.

For the block to which the BDPCM is applied, the intraprediction modemay be indicated by the value of intra_bdpcm_dir_flag[x0][y0]. Forexample, when the intra BDPCM direction information intra_bdpcm_dir_flagis 0, the device for processing the video signal may perform a step ofselecting the intra prediction mode (mode number 18) corresponding tothe horizontal direction among the plurality of intra modes as the intraprediction mode of the current block. In addition, when intra BDPCMdirection information intra_bdpcm_dir_flag is 1, the device forprocessing the video signal may perform a step of selecting the intraprediction mode (mode number 50) corresponding to the vertical directionamong the plurality of intra modes as the intra prediction mode of thecurrent block.

The intra prediction mode used in the block to which the BDPCM isapplied is the same as a general intra prediction mode, and thus thecorresponding mode may be stored as a variable IntraPredModeY[xCb][yCb],which indicates the intra prediction mode of the current predictionblock, and used when the MPM of a general coding block is derived. Thatis, the intra prediction mode of the current block may be used todetermine the intra prediction mode of a neighboring block to bereconstructed after the current block. In addition, the device forprocessing the video signal may store the intra prediction mode of thecurrent block as a candidate for determining the intra prediction modeof the neighboring block to be reconstructed after the current block.The device for processing the video signal may determine the intraprediction mode of the neighboring block to be reconstructed after thecurrent block by selecting one of a plurality of stored candidates basedon parsed information.

In addition, the intra prediction mode of the already reconstructedcoding block may be used to determine the intra prediction mode of thecurrent block. The device for processing the video signal may store theintra prediction mode of the already reconstructed coding block as acandidate for determining the intra prediction mode of the currentblock. The device for processing the video signal may determine theintra prediction mode of the current block by selecting one of theplurality of stored candidates based on the parsed information.

For example, if the current block is a general that is not a block towhich the BDPCM is applied, one of the already reconstructed neighboringblocks is the block to which the BDPCM is applied, andintra_bdpcm_dir_flag[x0][y0] is 0, the intra prediction mode number 18may be stored in IntraPredModeY[xCb][yCb]. In order to encode or decodethe general coding block, the device for processing the video signal mayuse the intra prediction mode number 18 of the already reconstructedneighboring block. More specifically, the device for processing thevideo signal may use the intra prediction mode number 18 of the alreadyreconstructed neighboring block when the MPM is derived for the currentblock. Since the purpose of the prediction mode of the block to whichthe BDPCM is applied is to minimize the final residual signals, theprediction method may be the same, but a preset value may be usedbecause the pattern of the residual signals may be different from thegeneral situation. DC mode may be set as one mode in the verticaldirection to the horizontal direction mode of BDPCM, as one mode in thehorizontal direction to the vertical mode of BDPCM, or as one mode inboth directions of BDPCM.

Although the above descriptive contents have been described from theviewpoint of the decoder, the same may be applied to the encoder aswell. In the above descriptive contents, the term parsing has beenmainly described for the process of obtaining information from the bitstream, but from the perspective of the encoder, parsing may beinterpreted as composing the corresponding information in the bitstream. Therefore, the term parsing is not limited to a decoderoperation, and the term parsing may be interpreted as an act ofcomposing a bit stream in terms of the encoder.

The above-described embodiments of the present invention can beimplemented through various means. For example, embodiments of thepresent invention may be implemented by hardware, firmware, software, ora combination thereof.

For implementation by hardware, the method according to embodiments ofthe present invention may be implemented by one or more of ApplicationSpecific Integrated Circuits (ASICs), Digital Signal Processors (DSPs),Digital Signal Processing Devices (DSPDs), Programmable Logic Devices(PLDs), Field Programmable Gate Arrays (FPGAs), processors, controllers,microcontrollers, microprocessors, and the like.

In the case of implementation by firmware or software, the methodaccording to embodiments of the present invention may be implemented inthe form of a module, procedure, or function that performs the functionsor operations described above. The software code can be stored in memoryand driven by a processor. The memory may be located inside or outsidethe processor, and may exchange data with the processor by various meansalready known.

The above-mentioned description of the present invention is forillustrative purposes only, and it will be understood that those ofordinary skill in the art to which the present invention belongs maymake changes to the present invention without altering the technicalideas or essential characteristics of the present invention and theinvention may be easily modified in other specific forms. Therefore, theembodiments described above are illustrative and are not restricted inall aspects. For example, each component described as a single entitymay be distributed and implemented, and likewise, components describedas being distributed may also be implemented in an associated fashion.

The scope of the present invention is defined by the appended claimsrather than the above detailed description, and all changes ormodifications derived from the meaning and range of the appended claimsand equivalents thereof are to be interpreted as being included withinthe scope of present invention.

1. A method for processing a video signal for decoding, the methodcomprising: parsing block-based delta pulse code modulation (BDPCM)enable information indicating whether BDPCM is enabled from a bitstream;when the BDPCM enable information indicates that the BDPCM is enabled, awidth of a current block is less than or equal to a first value and aheight of the current block is less than or equal to a second value,parsing intra BDPCM information indicating whether the BDPCM is appliedto the current block from the bitstream; when the intra BDPCMinformation indicates that the BDPCM is applied to the current block,parsing intra BDPCM direction information related to the current block;and reconstructing the current block based on the intra BDPCM directioninformation.
 2. The method of claim 1, wherein the first value and thesecond value are each a maximum block size that allows transform skip.3. The method of claim 1, wherein the intra BDPCM information and theintra BDPCM direction information are parsed for a luma componentregardless of a chroma component.
 4. The method of claim 1, wherein theBDPCM enable information is signaled as a sequence.
 5. The method ofclaim 1, wherein when the intra BDPCM information indicates that theBDPCM is applied to the current block, transform skip information of atransform block corresponding to the current block is not parsed fromthe bitstream, and wherein the transform skip information indicates thatthe transform is not applied to a block corresponding to the transformskip information when a value of the transform skip information is afirst inference value.
 6. The method of claim 5, further comprising:when the transform skip information does not exist and the intra BDPCMinformation indicates that the BDPCM is applied to the current block,inferring the transform skip information as the first inference value;and when the transform skip information does not exist and the intraBDPCM information indicates that the BDPCM is not applied to the currentblock, inferring the transform skip information as a second inferencevalue.
 7. The method of claim 1, wherein the intra BDPCM directioninformation indicates one of a horizontal direction or a verticaldirection.
 8. The method of claim 7, further comprising: when the intraBDPCM direction information is 0, selecting an intra prediction modecorresponding to the horizontal direction among a plurality of intramodes as an intra prediction mode of the current block; and when theintra BDPCM direction information is 1, selecting an intra predictionmode corresponding to the vertical direction among the plurality ofintra modes as the intra prediction mode of the current block.
 9. Themethod of claim 8, wherein the intra prediction mode of the currentblock is used to determine an intra prediction mode of a neighboringblock to be reconstructed after the current block.
 10. A device forprocessing a video signal for decoding a video image, the devicecomprising: a processor; and a memory, wherein the processor based oninstructions stored in the memory, parses block-based delta pulse codemodulation (BDPCM) enable information indicating whether BDPCM isenabled from a bitstream, when the BDPCM enable information indicatesthat the BDPCM is enabled, a width of a current block is less than orequal to a first value, and a height of the current block is less thanor equal to a second value, parses intra BDPCM information indicatingwhether the BDPCM is applied to the current block from the bitstream,when the intra BDPCM information indicates that the BDPCM is applied tothe current block, parses intra BDPCM direction information related tothe current block, and reconstructs the current block based on the intraBDPCM direction information.
 11. The device of claim 10, wherein thefirst value and the second value are each a maximum block size thatallows transform skip.
 12. The device of claim 10, wherein the intraBDPCM information and the intra BDPCM direction information are parsedfor a luma component regardless of a chroma component.
 13. The device ofclaim 10, wherein the BDPCM enable information is signaled as asequence.
 14. The device of claim 10, wherein when the intra BDPCMinformation indicates that the BDPCM is applied to the current block,transform skip information of a transform block corresponding to thecurrent block is not parsed from the bitstream, and wherein thetransform skip information indicates that the transform is not appliedto a block corresponding to the transform skip information when a valueof the transform skip information is a first inference value.
 15. Thedevice of claim 14, wherein the processor, based on instructions storedin the memory, when the transform skip information does not exist andthe intra BDPCM information indicates that the BDPCM is applied to thecurrent block, infers the transform skip information as the firstinference value, and when the transform skip information does not existand the intra BDPCM information indicates that the BDPCM is not appliedto the current block, infers the transform skip information as a secondinference value.
 16. The device of claim 10, wherein the intra BDPCMdirection information indicates one of a horizontal direction or avertical direction.
 17. The device of claim 16, wherein the processor,based on instructions stored in the memory, when the intra BDPCMdirection information is 0, selects an intra prediction modecorresponding to the horizontal direction among a plurality of intramodes as an intra prediction mode of the current block, and when theintra BDPCM direction information is 1, selects an intra prediction modecorresponding to the vertical direction among the plurality of intramodes as the intra prediction mode of the current block.
 18. The deviceof claim 17, wherein the intra prediction mode of the current block isused to determine an intra prediction mode of a neighboring block to bereconstructed after the current block.
 19. (canceled)
 20. (canceled) 21.A device for processing a video signal for encoding, the devicecomprising: a processor; and a memory, wherein the processor, based oninstructions stored in the memory, generates block-based delta pulsecode modulation (BDPCM) enable information indicating whether BDPCM isenabled, when the BDPCM enable information indicates that the BDPCM isenabled, a width of a current block is less than or equal to a firstvalue, and a height of the current block is less than or equal to asecond value, generates intra BDPCM information indicating whether theBDPCM is applied to the current block, when the intra BDPCM informationindicates that the BDPCM is applied to the current block, generatesintra BDPCM direction information related to the current block, andgenerates a bitstream based on the BDPCM enable information, the intraBDPCM information, and the intra BDPCM direction information.
 22. Thedevice of claim 21, wherein when the intra BDPCM information indicatesthat the BDPCM is applied to the current block, transform skipinformation of a transform block corresponding to the current block isnot generated.
 23. (canceled)
 24. A non-transitory computer-readablemedium storing a bitstream, the bitstream being decoded by a decodingmethod, wherein the decoding method, comprising: parsing block-baseddelta pulse code modulation (BDPCM) enable information indicatingwhether BDPCM is enabled from a bitstream; when the BDPCM enableinformation indicates that the BDPCM is enabled, a width of a currentblock is less than or equal to a first value and a height of the currentblock is less than or equal to a second value, parsing intra BDPCMinformation indicating whether the BDPCM is applied to the current blockfrom the bitstream; when the intra BDPCM information indicates that theBDPCM is applied to the current block, parsing intra BDPCM directioninformation related to the current block; and reconstructing the currentblock based on the intra BDPCM direction information.